/**
 *@module Region
 *@desc 企业信息-区域
 *@author LiHongKun
 *@date 2018-08-10 11:36:58
 */
Ext.define('js.project.ProjectMergerPage', {
    extend: 'Ext.form.Panel',
    requires: ['js.Util', 'js.ctrl.Common'],
    controller: 'Common',
    url: 'enterpriseRouters',
    config: {
        bodyPadding: '21 20 20 20',
        layout: {
            type: 'vbox',
            align: 'stretch'
        }
    },
    fieldDefaults: {
        labelWidth: 140,
        allowBlank: false
    },
    initComponent: function () {

        Ext.QuickTips.init();
        Ext.form.Field.prototype.msgTarget = 'under';
        let projectmerger_name = {
            xtype: 'textfield',
            name: 'projectmerger_name',
            id: 'projectmerger_name',
            allowBlank: false,
            msgTarget : 'qtip',
            height:50,
            margin:'15 0 31 0',
            labelSeparator: '',
            fieldLabel: '合并后项目名称:'
        };
        let projectmerger_comment = {
            xtype: 'textarea',
            name: 'projectmerger_comment',
            id: 'projectmerger_comment',
            allowBlank: false,
            msgTarget : 'qtip',
            height:155,
            margin:'0 0 31 0',
            labelSeparator: '',
            fieldLabel: '备注:'

        };
        let items = [projectmerger_name,projectmerger_comment];

        this.items = items;

        this.callParent(arguments);
    },
    submit: function () {
        let form = this.getForm();
        let params = Ext.Object.merge({action_type: this.action_type});
        if (form.isValid()) {
            form.submit({
                params: params,
                success: this.success,
                failure: this.fail
            });
        }
    },
    success: function (response) {
        Ext.toast('保存成功');
    },
    fail: function (form, action) {
        Ext.toast(`<div style="font-size:28px;">保存失败，${action.failureType}，${action.result.message}</div>`);
    },
   ````
});